using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI.WebControls;
using System.Web.UI;
using System.IO;
using System.Web.UI.HtmlControls;
namespace Library.WebControls.SimpleTextEdit {
	public class SpTextEditDesign : System.Web.UI.Design.ControlDesigner {
		public override string GetDesignTimeHtml() {
			SpTextEdit te = (SpTextEdit)Component;
			return GetDesignTimeHtml(te);
		}

		internal static string GetDesignTimeHtml(SpTextEdit te) {
			StringWriter sw = new StringWriter();
			HtmlTextWriter html = new HtmlTextWriter(sw);
			HtmlGenericControl span = new HtmlGenericControl("span");
			TextBox textBox = new TextBox();
			span.Controls.Add(textBox);
			Control link = BaseControl.CreateResolveClientCssLink(te.ResolveClientUrl(te.CssFileName));
			if (link != null) {
				span.Controls.AddAt(0, link);
			}
			textBox.Width = te.Width;
			textBox.Text = te.Text;
			textBox.TextMode = te.TextMode;
			textBox.Visible = te.Visible;
			textBox.Rows = te.Rows;
			textBox.ReadOnly = te.ReadOnly;
			span.RenderControl(html);
			return sw.ToString();
		}
	}
}